home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Utilities / Programming / MT2Trivial 1.0b2 / Read.Me < prev    next >
Encoding:
Text File  |  1996-06-11  |  11.8 KB  |  323 lines  |  [ttro/ttxt]

  1. MT2Trivial, version 1.0b2
  2. ©  Copyright by Michael Trofimov, 1996.
  3. email : mtrofimov@glas.apc.org
  4. ______________________________________________________
  5.  
  6. This Drag&Drop utility generates Pascal source from resource
  7. description file.
  8.  
  9.  
  10. CONTENTS .
  11. __________
  12.  
  13.     1. FILES/FOLDERS LIST.
  14.     2. ABOUT MT2Trivial.
  15.     3. AN EXAMPLE.
  16.     4. WRITING PROGRAMS FROM SCRATCH.
  17.     5. VERSION HISTORY.
  18.     6. BUGS REPORTS, COMMENTS ETC.
  19.     7. COPYRIGHT
  20.     8. OTHER MT2 SOFTWARE
  21.     9. ABOUT THE AUTHOR.
  22.  
  23. 1. FILES/FOLDERS LIST.
  24. ______________________
  25.  
  26. "MT2Trivial 1.0b2 ƒ" folder contains the following files and folders:
  27.  
  28.         Read.Me                 # this file;
  29.         MT2Trivial              # the application;
  30.         MainLoop.Trivial        # pattern file to generate events related 
  31.                                 # procedures;
  32.         MakeMenu.Trivial        # pattern file to generate menu bar support 
  33.                                 # procedures (1);
  34.         MenuComm.Trivial        # pattern file to generate menu bar support 
  35.                                 # procedures (2);
  36.         Uses.Trivial            # pattern file to generate "uses" list;
  37.         
  38.     "MainLoop.Trivial THINK Pascal" folder contains :
  39.     
  40.         MainLoop.Trivial                 # pattern file to generate events related      
  41.                                                                                                                              # procedures for THINK Pascal;
  42.                                  
  43.     "Example" folder contains :
  44.     
  45.         test.rsrc                                       # an example resource file;
  46.         test.r                                          # resource description file;
  47.         test.p                                          # Pascal source generated by MT2Trivial from 
  48.                                       # "test.r" file;
  49.         test.Dict                                       # dictionary generated by MT2Trivial from 
  50.                                       # "test.r" file for Canon MPW tool;
  51.         test.make                                       # MPW make file for compiling and linking 
  52.                                       # "test.p" and "test.r" under MPW;
  53.         test                                      # the application (produced from the sources 
  54.                                 # "test.p" and "test.r").
  55.  
  56. 2. ABOUT MT2Trivial.
  57. _________________
  58.                                                 
  59.  MT2Trivial  writes a program, where
  60.   
  61.   -- resources IDs are listed in CONST list;
  62.   
  63.   -- templates of procedures to support some types (DLOG,MENU,WIND,
  64.           etc.) of the resources are introduced;
  65.           
  66.   -- some other templates for standard procedures such as Mac 
  67.      managers initialization and event loop, program header and 
  68.      program body are appended;
  69.      
  70.  etc.
  71.  
  72. To generate a name (identifier), MT2Trivial gets comment for
  73. resource from the resource description. So, to provide readable
  74. code, you should write comments for each of resources. MT2Trivial
  75. ignores any character, which is not appropriated for identifier,
  76. adds letter prefix if resource comment begins from digit and so on.
  77. But if you dislike a number of such names you are able to use
  78. test.Dict that is dictionary file for renaming by Canon MPW
  79. command. To generate procedure templates MT2Trivial uses pattern
  80. files :
  81.  
  82.         MainLoop.Trivial
  83.         MakeMenu.Trivial
  84.         MenuComm.Trivial
  85.         Uses.Trivial
  86.  
  87. which look like well-known examples from Inside Macintosh. You can
  88. modify these files to get necessary result of generation. Also,
  89. there are another goodies to simplify  your programming work. For
  90. example, MT2Trivial copies Uses template with alphabetical list of
  91. standard units, you can simply uncomment the necessary of them. You
  92. can add names of your own units to Uses.Trivial file, etc.
  93.  
  94. NOTE: There are initializing of the Toolbox in MainLoop.Trivial, 
  95.       that is not necessary for THINK Pascal. So, for THINK Pascal 
  96.       environment replace the file with "MainLoop.Trivial" file from
  97.       "MainLoop.Trivial THINK Pascal" folder!
  98.  
  99. MT2Trivial inserts placeholders (commented %%-markers) where
  100. programmer should insert or modify source code. However, in some
  101. cases the generated program pattern may  be compiled, linked and
  102. executed successfully (for example, run the test application, which
  103. was built by test.make file, from test.p gotten from MT2Trivial's
  104. output as is.) Of course, the  test does not make any useful works
  105. -- it's pattern only, but it's valuable pattern -- it runs without
  106. run-time errors!
  107.  
  108. NOTE:  MT2Trivial does not generate a code for quitting from the 
  109.        program, so the only way to exit from the "test" application 
  110.        would be "Opt-Cmd-Esc" keys. The better way is to insert 
  111.        a few lines of Pascal code into "test.p" to support Quit item 
  112.        in File menu.
  113.  
  114. By default MT2Trivial generates the most complete source, but for
  115. some tasks, for example, when your program has been already written
  116. and you need to insert there additional constant list, the full
  117. text generation may be too redundant -- too large parts of the text
  118. you would erase by hand. In similar cases you can suppress
  119. generation of the parts by option's  setting. To help your
  120. orientation -- which option defines which part generation,  the
  121. parts of generated source begins from comments like this:
  122.  
  123.     {%% MT2Trivial Generation: Main Loop}
  124.  
  125. NOTE : The number of resources may be used for generation  is very 
  126.        restricted for current version of MT2Trivial (Not more 32 
  127.        resources in resource file is possible).
  128.  
  129.  
  130. 3. AN EXAMPLE.
  131. ______________
  132.  
  133. 1) create myFile.rsrc file by ResEdit;
  134.  
  135. 2) decompile it via DeRez by Apple Computer, Inc. 
  136.    (or via another similar utility) to myFile.r 
  137.    resources description file;
  138.    
  139. 3) drag myFile.r icon by mouse and drop the icon onto 
  140.    MT2Trivial icon: you will be prompted about generation 
  141.    parameters -- press OK button: MT2Trivial writes myFile.p file.
  142.    
  143. Now you are able to modify myFile.p for your needs.
  144.  
  145.  
  146. 4.WRITING PROGRAMS FROM SCRATCH.
  147. ________________________________
  148.  
  149. The following software engineering approach may be used:
  150.  
  151. 1) creation of interface elements : drawing images for resources 
  152.    (in graphics editor) and define necessary resources by
  153.    resource editor (ResEdit);
  154.  
  155. 2) conversion of the resources into resource description file 
  156.    (text) via DeRez (SADeRez etc.);
  157.  
  158. 3) shell code generation by MT2Trivial: generate source code 
  159.    of the program to support these resources;
  160.    
  161. 4) shell code correction, modification and testing :
  162.    the generated interface should work correctly,however the 
  163.    generated program is only shell, which supports  user's 
  164.    interface only (menus, dialogs, windows etc.), but unable 
  165.    to do another useful actions (no calculations, no data streams 
  166.    treatment... no more): routines for the actions are empty, 
  167.    for example:
  168.    
  169.   procedure CalcExpression (s : string);
  170.     begin end;
  171.   
  172.   ................
  173.   
  174.   procedure mainDialog;
  175.    begin
  176.    
  177.    ................
  178.    case selectedDialogItem of
  179.    calcIt: CalcExpression (expression);
  180.    ...................  
  181.  
  182.   
  183. 5) analysis and planning :
  184.    in the result of step 4 we have working model, now we are able
  185.    to list all empty routines (CalcExpression etc.), to write 
  186.    specifications for each and (in the case of programming team) 
  187.    to define exact tasks for each programmer:
  188.    
  189.    1st programmer will write CalcExpression
  190.    2nd programmer will write ......
  191.    ........................
  192.    
  193. This approach had been tested for different tasks:
  194.  
  195.     CalcWindow - calculator for advanced users : suitable user
  196.     interface; possibility for users to write extensions in popular
  197.     programming language (Pascal,C,C++, etc.); text input/output; 
  198.     communications with other programs via Clipboard and Drag
  199.     Manager, etc.
  200.  
  201.     MT2HAPrjDemo - demo-program of Home Account project  (co-author:
  202.     Mary Trofimov): money calculations -- day-to-day balance for
  203.     incomes and expenses, multitasking for all members of a family,
  204.     statistic and planning for house keeping, cookery (recipe
  205.     database, menu for current week, diets), CD-ROM support,
  206.     etc. The program won a prize in  competition of financial
  207.     programs for house keeping (1C Co., Moscow, Russia 1996).
  208.  
  209.     LogRead - session log interpreter for Glasnet users : beta
  210.     version 1.0b1, and next version 1.2. Now distributed between
  211.     users of Glasnet (Russia).
  212.  
  213.     And of course, this program (see VERSION HISTORY in this file). 
  214.  
  215.  
  216. 5.VERSION HISTORY.
  217. __________________
  218.  
  219. May/June, 1996: MT2Trivial, version 1.0b2:
  220.                 GUI support procedures of current version of 
  221.                 MT2Trivial had been generated by Trivial MPW Tool,
  222.                 after that generator's procedures from Trivial 
  223.                 were improved  and introduced to MT2Trivial utility.
  224.  
  225.  
  226. October,1995:   Trivial version 1.0b1 MPW tool:
  227.                 This MPW Tool was included in MT2Toolkit for 
  228.                 MPW Pascal programmers.
  229.  
  230. 6. BUGS REPORTS, COMMENTS ETC.
  231. ______________________________
  232.  
  233. Please, send it via email to mtrofimov@glas.apc.org
  234.  
  235.  
  236. 7. COPYRIGHT
  237. ____________
  238.  
  239. Copyright by Michael Trofimov, 1996.
  240.  
  241. To publish the program, for example, to insert it
  242. into CD-ROM, please ask the author about permission.
  243.  
  244. All files listed in "Files/folders list" should be copied as is.
  245.                                 
  246.                                 
  247. 8. OTHER MT2 SOFTWARE
  248. _____________________
  249.  
  250. 1. MT2Toolkit 
  251.         is tool kit for MPW Pascal programmers. It makes easier a
  252.         variety of permanent programming jobs and so, it's  capable to
  253.         save your time and efforts, and, perhaps, to preserve against
  254.         some simple, but wide-distributed bugs.MT2Toolkit may be found
  255.         in many ftp-sites, for example,
  256.  
  257.         nic.switch.ch/mirror/info-mac/dev/lib/mt2-tool-kit-p.hqx
  258.  
  259. and in Apprentice 4 CD-ROM by Celestin Company, Inc.
  260.                             (http://www.celestin.com)
  261.                                 
  262.  NOTE: MPW Trivial Tool version 1.0b1 is not updated it in this 
  263.         toolkit, yet. So, use MT2Trivial utility instead the tool.
  264.         Please, be sure to send your request to mtrofimov@glas.apc.org
  265.         for new version of MPW Trivial Tool if MPW Tool  looks like
  266.         more preferable for your purposes than application.
  267.         
  268. 2.Color Music System Prometheus (shareware): 
  269.         makes visual effects for musical  playing. A sound signal should
  270.         be load to audio-input of Macintosh  (in simple case, the
  271.         source of the signal may be a microphone). 
  272.  
  273. You can find Prometheus-demo in ftp-sites, for example,
  274.  
  275.         mirrors.aol.com/pub/mac/sound/soundutil/prometheus.sit.hqx
  276.  
  277. and in Info-Mac VII CD-ROM by Pacific HiTech
  278.     (http://www.pht.com)
  279.         
  280. 3.Color Music System Prometheus Russian version  (shareware):
  281.   Read.me file, text in windows and balloon help in Russian.
  282.   Please, send your request to mtrofimov@glas.apc.org to receive it.
  283.   
  284.  
  285. 9. ABOUT THE AUTHOR.
  286. ____________________
  287.  
  288. Michael Trofimov is a computer scientist, chemist and programmer. 
  289. He works in Lab of Computer Chemistry, N.D.Zelinsky Institute of 
  290. Organic Chemistry of Academy of Sci of Russia. Also he makes
  291. independent researches and commercial programs development.
  292.  
  293. He works 15 years in computer areas, among his works:
  294.  
  295. -- Real-time system for ESR spectroscopy;
  296. -- Scientific program EDIP, to solve index-property problem for 
  297.         organic compounds;
  298. -- Algorithms for applied tasks of graph-theory;
  299. -- Graphics  Library for Extended Pascal compiler,
  300.         (Visible Software Co., DE, USA; Prospero Software Co. UK);
  301. -- Dr. Pascal integrated environment porting -- from IBM PC to Mac, 
  302.         Mac oriented language sensitive editor and interface of Dr.
  303.         Pascal (Visible Software);        
  304. etc. 
  305.  
  306. He is author of more than 50 papers in Russian and international
  307. journals (First Class; Byte; J.of Pascal, Ada  & Modula-2; 
  308. J.of Mathematical Chemistry; etc.). 
  309.  
  310. The MT2Trivial was planned as accumulation of author's experience 
  311. of methods to solve tasks of practical programming. Author uses it
  312. permanently in his works, and  so consequently improves and
  313. develops it.
  314.  
  315.  
  316. _____________________________________________________
  317.  
  318. THANK YOU  for your interest to MT2 software,
  319.  
  320. Michael I. Trofimov. 
  321. ______________________________________________________
  322.  
  323.